Working With Sound Volume
The Movie Toolbox allows you to set the sound volume of movies and tracks. Track volumes allow tracks within a movie to have different volumes. A track's volume is scaled by the movie's volume to produce the track's final volume. Furthermore, the movie's volume is scaled by the sound volume that is returned by the Sound Manager'sGetSoundVol
routine. Thus, the user can control the overall volume from the Sound control panel.Volume values range from -1.0 to 1.0. Higher values translate to louder volume. Negative values indicate muted volume. That is, the Movie Toolbox does not play any sound for movies or tracks with negative volume settings, but the original volume level is retained as the absolute value of the volume setting. Therefore, if you want to toggle the current state of the volume, you can invert the sign of the current volume setting, as shown here:
SetMovieVolume (theMovie, -GetMovieVolume (theMovie));You can use theGetMovieVolume
andSetMovieVolume
functions to work with a movie's volume.The
GetTrackVolume
andSetTrackVolume
functions allow you to work with a track's volume.
Subtopics
- SetMovieVolume
- GetMovieVolume
- SetTrackVolume
- GetTrackVolume